package init;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import sessions.MusicManager;
import sessions.UserManager;

/**
 *
 * @author Antoine BOULINGUEZ & Shyn-Yuan CHENG
 */
@Singleton
@Startup
public class InitialiseurDeBD {
    @EJB
    private MusicManager musicManager;
    @EJB
    private UserManager userManager;
    
    
    @PostConstruct
    public void initApplication() {
        userManager.createTestUsers();
        musicManager.initDBWithMp3s();
        System.out.println("##### BD initialisée ####");
    }
    
}
